package com.telecom.controller.admin;

import com.telecom.common.convention.result.PageDTO;
import com.telecom.common.convention.result.Result;
import com.telecom.pojo.dto.admin.finance.FinancePageQueryRequestDTO;
import com.telecom.pojo.vo.admin.finance.RechargeRecordVO;
import com.telecom.service.FinanceService;
import jakarta.annotation.Resource;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import jakarta.validation.Valid;

/**
 * 财务管理相关接口
 */
@RestController
@RequestMapping("/admin/finance")
@Slf4j
public class FinanceController {

    @Resource
    FinanceService financeService;

    /**
     * 充值记录分页查询
     * 
     * @param queryRequest 查询参数
     * @return 充值记录列表分页结果
     */
    @GetMapping("/page")
    public Result<PageDTO<RechargeRecordVO>> page(@Valid FinancePageQueryRequestDTO queryRequest) {
        log.info("充值记录分页查询，查询参数：{}", queryRequest);
        PageDTO<RechargeRecordVO> result = financeService.getRechargeRecordPage(queryRequest);
        return Result.success(result);
    }

}